Fix deprecated avifile/addframe API and timeseries_extract_slice returning all zeros#70
Conversation
Co-authored-by: torwager <6262700+torwager@users.noreply.github.com>
|
@copilot resolve the merge conflicts in this pull request |
# Conflicts: # CanlabCore/Data_extraction/timeseries_extract_slice.m
|
Merged current Heads-up for review (not a conflict): this rewrite drops the Static analysis is clean (only pre-existing preallocation hints in the slice loop). 🤖 Generated with Claude Code |
movie_toolsandmovie_of_slice_timeseriesused the removedavifile()/addframe()API.timeseries_extract_slicereturned all zeros due to doublespm_volremapping and was missing sagittal/coronal implementations entirely.timeseries_extract_slice.mget_ax_slice→spm_vol→spm_slice_vol) with direct inline extraction using thespm_matrix+spm_slice_volpattern from the workingtimeseries4.mget_ax_slice.meye(4)+C(3,4) = slice_numwithspm_matrix([0 0 slice_num]), consistent withcluster_orthviews.mV(i).dim(1:2)per-volume instead of pre-computedV(1).dim(1:2)movie_of_slice_timeseries.mwriteVideo(mov, H)passed a raw axes handle — fixed towriteVideo(mov, getframe(H))mov.Qualitywas a bare property read (no-op) — fixed tomov.Quality = 75add_a_framehelper to matchmovie_tools.mavifile()/addframe()withVideoWriter/open/writeVideo/getframein the'avi'branchOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.